ScxV6Server.ChangePassword Method
Changes a user's password.
Parameters
- Username
The name of the user account to change. - NewPassword
The new password of the user account. - OldPassword
The old password of the user account.
Remarks
This method can be used to change the password of any user on the system except the built-in users or the Super User account. If the user whose password is being changed is the user currently logged on to the server, then the old password is not required. To change the password of a different user, the old password must be specified, or the logged on user must have security and configure access to the user. The maximum length of new passwords is 80 characters.
The following example written in VB.NET changes the password of both the current user and a different user.
Dim Svr As ScxV6DbClient.ScxV6Server
' Connect to the server
Svr = New ScxV6DbClient.ScxV6Server
Svr.Connect("MAIN", "Export", "Password")
' Change the password of the logged on user "Export"
Svr.ChangePassword("Export", "NewPassword")
' Change the password of a different user to "NewPassword2"
Svr.ChangePassword("Operator", "NewPassword2", "OldPassword")